package com.cloudcentral.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cloudcentral.entity.Auth;

/**
 * <p>
 * 系统菜单权限表 Mapper 接口
 * </p>
 *
 * @author Administrator
 * @since 2023-10-27
 */
public interface AuthBaseMapper extends BaseMapper<Auth> {
  default Auth selectByName(String name) {
    QueryWrapper<Auth> queryWrapper = new QueryWrapper<>();
    queryWrapper.eq("name", name);
    return selectOne(queryWrapper);
  }

  default Auth selectByUrl(String url) {
    QueryWrapper<Auth> queryWrapper = new QueryWrapper<>();
    queryWrapper.eq("url", url);
    return selectOne(queryWrapper);
  }
}
